Skip to content

Conversation

@donaldkuck
Copy link

Add MPS support and centralize device selection

  • Add get_device() function in pytorch_utils.py supporting CUDA, MPS, and CPU
  • Refactor 26 PyTorch model files to use centralized device selection
  • Enable automatic MPS device selection on Apple Silicon devices

The device selection priority is: CUDA > MPS > CPU

@donaldkuck
Copy link
Author

@donaldkuck please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@SunsetWolf
Copy link
Collaborator

Hi, @donaldkuck

Thanks for your contribution! Could you please fix the CI failures?

@donaldkuck
Copy link
Author

Hi, @donaldkuck

Thanks for your contribution! Could you please fix the CI failures?

done

@donaldkuck donaldkuck changed the title #2050: pytorch benchmarks support mps device feat: pytorch benchmarks support mps device Nov 20, 2025
@donaldkuck
Copy link
Author

Hi, @donaldkuck
Thanks for your contribution! Could you please fix the CI failures?

done

sorry, fix again

@donaldkuck
Copy link
Author

@SunsetWolf Hi, I have updated the code again and passed the local pytest tests. The runtime error in CI may not be caused by the code itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants